package com.icss.lesson1;

import java.io.FileOutputStream;

public class TestMain2 {

    public static void main(String[] args) {

        // 对象的实例化
        // new 是开辟一块内存（堆非连续性）  Student(); 构造器|构造子|构造方法
        Student stu = new Student();
        stu.setName("Tom");
        stu.setSno(1);
        stu.study();

        Student stu2 = new Student();
        stu2.setName("Jerry");
        stu2.setSno(2);
        stu2.study();

        Student stu3 = new Student("张三", 3);
        stu3.study();

        System.out.println("---1--");
        a();
        System.out.println("---2--");
    }

    private static void a() {
        System.out.println("---3--");
        b();
        System.out.println("---4--");
    }

    private static void b() {
        System.out.println("---5--");
    }
}
